<?php
// Set error reporting pretty high
error_reporting(E_ALL | E_STRICT);

// Get base and application path
define('BASE_PATH', dirname(dirname(__FILE__)));
define('APPLICATION_PATH', BASE_PATH . '/application');

// Define filters for clover report
PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/tests');
PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/library');
PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/application/config');
PHPUnit_Util_Filter::addDirectoryToWhitelist(BASE_PATH . '/application', '.php');

// Set include path
$includePath = BASE_PATH . '/library' . PATH_SEPARATOR
             . APPLICATION_PATH . '/library' . PATH_SEPARATOR
             . get_include_path();

set_include_path($includePath);

// Get the autolaoder and set module autoloaders
require_once 'Zend/Loader/Autoloader.php';

$autoLoader = Zend_Loader_Autoloader::getInstance();
$autoLoader->registerNamespace('App');

$moduleLoader = new Zend_Application_Module_Autoloader(array(
    'namespace' => 'Default',
    'basePath'  => APPLICATION_PATH . '/modules/default',
));

$moduleLoader = new Zend_Application_Module_Autoloader(array(
    'namespace' => 'Blog',
    'basePath'  => APPLICATION_PATH . '/modules/blog',
));

$moduleLoader = new Zend_Application_Module_Autoloader(array(
    'namespace' => 'Misc',
    'basePath'  => APPLICATION_PATH . '/modules/misc',
));

// Set locale
setlocale(LC_CTYPE, 'en_US.utf-8');
